<aside class="aside-wrapper">
    <div class="sidebar-loading" ng-if="!$root.isMenuLoad">
        <i class="fa fa-spin fa-spinner"></i>
    </div>
    <div class="sidebar-wrapper">
        <div ng-if="$root.isMenuLoad" ng-repeat="menu in vm.menus track by $index" class="sidebar-cont" ng-class="{'sidebar-menu-fold': menu.fold }">
            <div class="sidebar-title" ng-if="menu.hasChildren" ng-click="vm.toggleOpenMenu(menu)">
            <span class="title-icon">
                <i class="fa" ng-class="{'fa-caret-right': menu.fold, 'fa-caret-down': !menu.fold}"></i>
            </span>
            <span class="title-text" ng-bind="menu.menuName">
            </span>
            </div>
            <div class="sidebar-title" ng-if="!menu.hasChildren">
                <a href="{{menu.urlAddr}}">
                <span class="title-icon">
                    <i class="fa fa-caret-right"></i>
                </span>
                <span class="title-text" ng-bind="menu.menuName">
                </span>
                </a>
            </div>
            <ul class="sidebar-menu" ng-if="menu.hasChildren" ng-style="vm.calcMenuHeight(menu)">
                <li ng-class="{ 'active': vm.state == item.urlAddr }" ng-repeat="item in menu.item" class="sidebar-menu-item">
                    <a ng-if="vm.checkUrl(item.urlAddr) == 1" ui-sref="{{item.urlAddr}}" data-uri="sys.{{item.urlAddr}}" data-mid="{{item.menuId}}">
                    <span class="menu-icon">
                        <i class="fa fa-caret-right"></i>
                    </span>
                        <span class="menu-text" ng-bind="item.menuName"></span>
                    </a>
                    <a ng-if="vm.checkUrl(item.urlAddr) == 2" ng-href="{{item.urlAddr}}" target="_blank" data-uri="{{item.urlAddr}}" data-mid="{{item.menuId}}">
                    <span class="menu-icon">
                        <i class="fa fa-caret-right"></i>
                    </span>
                        <span class="menu-text" ng-bind="item.menuName"></span>
                    </a>
                </li>
            </ul>
        </div>
    </div>
</aside>